<?php
    $user = $this->controller->getUser();
    
    $vote_info = $this->layout()->vote_info;
    $vote_list = array();
    foreach($vote_info as $thread_id=>$thread){
        $now = time();
        foreach($thread as $phase_id=> $phase){
            if($phase->view_enable==1){
                $vname = $phase->thread_name;
                $vid = $thread_id."_".$phase_id;
                $vote_list[] = array("name"=>$vname, "votephoto_category"=>$phase->votephoto_category, "vid"=>$vid, "thid"=>$thread_id, "pid"=>$phase_id);
            }
        }
        
    }
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title><?echo ($this->layout()->title!="" ? $this->escape($this->layout()->title) : "") ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="generator" content="">
    <link rel="shortcut icon" href="/misc/favicon.ico" type="image/x-icon" />

    <!--Import CSS files:-->
    <link href="<?php echo $this->layout()->spath; ?>/css/style_all.css" rel="stylesheet" type="text/css" />       
    <!--End css files-->
    <script type="text/javascript" src="<?php echo EVENT_STATIC_SERVER;?>/js/swfobject.js"></script>
    <script type="text/javascript" src="<?php echo EVENT_STATIC_SERVER;?>/js/jquery.js"></script>
    <script type="text/javascript" src="<?php echo EVENT_STATIC_SERVER;?>/js/event_cover_comment.js"></script>
    <script type="text/javascript" src="<?php echo EVENT_STATIC_SERVER;?>/js/fadeimage.js"></script>

   <!--[if lt IE 7]>
        <script defer type="text/javascript" src="<?php echo EVENT_STATIC_SERVER;?>/js/pngfix.js"></script>
        <link href="<?php echo EVENT_STATIC_SERVER;?>/css/ie6fix.css" rel="stylesheet" type="text/css" />
    <![endif]-->

</head>
<body style="background-color:#000000;">
<div id="container">
    <!--Menu tamtay:-->
    <div style="background-color:#000000; border-bottom:1px solid #222">
        <div id="ttbar" class="page-center">
            <div class="ttmenu">
                <a href="http://www.tamtay.vn">Tamtay.vn</a> | 
                <a href="http://www.tamtay.vn/video">Video</a> | 
                <a href="http://www.tamtay.vn/image">Ảnh</a> | 
                <a href="http://www.tamtay.vn/music">Nhạc</a> | 
                <a href="http://blog.tamtay.vn">Blog</a> | 
                <a href="http://www.tamtay.vn/event/browse">Sự kiện</a> | 
                <a href="http://www.tamtay.vn/mybookmark/all">Web hay</a> | 
                <a href="http://www.tamtay.vn/group/browse">Nhóm</a> | 
                <a href="http://www.tamtay.vn/myttnetwork/home">Network</a> | 
                <a href="http://www.tamtay.vn/group/forum">Diễn đàn</a>
            </div>
            <div class="navi" style="padding-top:0px">
                <?php if ($user->uid) {?>
                <div class="ttuser">Chào <strong><?php echo $user->name; ?></strong> - <a href="<?php echo IDS_LOGOUT_URL;?>">Thoát</a></div>
                <?php } else {?>
                    <a href="<?php echo IDS_LOGIN_URL;?>">Đăng nhập</a>&nbsp;
                    <a href="<?php echo IDS_REGISTER_URL;?>">Đăng ký</a>
                <?php }?>    
          </div>
        </div>
    </div>
        
    <!--Header:-->
    <div id="header" class="page-center">
        <!--Banner:-->
        <div id="banner"></div>
        <!--Menu:-->
        <div id="menu">
            <ul class="menu-left">
                <li><a href="/event/<?php echo $this->layout()->short_cut;?>" title="Trang chủ">Trang chủ</a></li>
                <li><a href="/event/<?php echo $this->layout()->short_cut;?>#mark_news" title="Tin tức">Tin tức</a></li>
                <?php for($i=0; $i<count($vote_list); $i++){
                    $vote = $vote_list[$i];
                    if($vote["votephoto_category"] > 0){
                    ?>
                    <li><a href="http://photo.tamtay.vn/category/browse/<?php echo $vote["votephoto_category"];?>" title="Tin tức"><?=$vote["name"];?></a></li>
                <?php }else {?>
                <li><a href="/event/<?php echo $this->layout()->short_cut; ?>/votedlist/<?php echo $vote["thid"]."/".$vote["pid"];?>" title="Tin tức"><?=$vote["name"];?></a></li>
                <?php 
                    } // End of if
                    } ?>
                <li><a href="/event/<?php echo $this->layout()->short_cut;?>#mark_video" title="Video">Video</a></li>
            </ul>
            <ul class="menu-right">               
                
            </ul>            
        </div>
    </div>
    
    <div class="clear"></div>    
    
    <div style="margin:0 auto; width:860px;">
        <!--Left Bar:-->
        <div id="leftbar">            
            Left bar
        </div>
        
        <div id="wrapper">
            <div id="content">
            <?php echo $this->layout()->content;?>
          </div>
        </div>       
        
        <!--right Bar:-->
        <div id="rightbar"></div>
    </div>
        
    <div class="clear"></div>
    
    <!--Footer:-->
    <div id="footer" class="page-center">
        <p class="copyright">Copyright by tamtay.vn</p>
        <p class="logo"><a href="http://www.tamtay.vn" title="www.tamtay.vn"><img src="<?php echo $this->layout()->spath; ?>/images/logo_tt_footer.gif" /></a></p>
    </div>
</div>
</body>
</html>